<template>
    <div>
        <van-nav-bar title="我的发布" left-text="返回" left-arrow @click-left="onClickLeft" />
        <div style="padding: 20px 15px;border-top: 2px solid #ccc;" v-for="item in mySend" :key="item.s_con_id">
            <div style="display: flex;align-items: center;">
                <img style="width: 40px;height: 40px;border-radius: 100px;" :src="item.buddha" alt="">
                <div style="margin-left: 10px;font-size: 16px;font-weight: 700;">{{ item.username }}</div>
            </div>
            <div class="count">
                {{ item.s_content }}
            </div>
            <div class="time">{{ item.s_time }}</div>
        </div>
    </div>
</template>

<script>
import { getUsersendAPI } from '@/api/API';
export default {
    name: 'mySend',
    data() {
        return {
            mySend: ''
        }
    },
    methods: {
        onClickLeft() {
            this.$router.push('/user')
        }
    },
    mounted() {
        getUsersendAPI(localStorage.getItem('userID')).then((res) => {
            console.log(res.data.data);
            this.mySend = res.data.data
        })
    }
}
</script>

<style scoped>
.count {
    font-size: 22px;
    padding: 10px;
}

.time {
    position: absolute;
    right: 30px;
    color: #ccc;
}
</style>